#version 460
#extension GL_GOOGLE_include_directive : enable
#include "../../../../core/shader_binding_ID.h"


layout(location = 1) in VS_FS_VERTEX {
	vec4	vColor;
	flat ivec3	vUV_Offset;
	flat ivec2	vUV_Bound;
};

layout(location=0) out vec4 outColor;


layout(binding = DEF_BINDING_WIDGET_Texture) uniform sampler2DArray tex;

void main(void){
	vec3 uv = vec3(gl_PointCoord * (vUV_Bound.y), vUV_Offset.z);
	//outColor = vec4(uv/vUV_Bound.y, 1);
	uv.xy += vUV_Offset.xy * vUV_Bound.y;
	
	float a = texelFetch(tex, ivec3(uv), 0).r;
	outColor = vec4(vColor.rgb, a * 1.3);
	
}

 